<?php

declare(strict_types=1);

namespace App\Controller;

use Hyperf\HttpServer\Annotation\Middleware;
use App\Middleware\JTAuthMiddleware;
use App\Middleware\CorsMiddleware;
use App\Service\YuanYu\MainInfoService;
use App\Service\YuanYu\StartHittingService;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Controller;

/**
 * @Controller(prefix="yuanyu")
 * @Middleware(JTAuthMiddleware::class)
 */
class YuanyuController extends AbstractController
{
    /**
     * 开启搭讪
     * @RequestMapping(path="hit_start", methods="post")
     */
    public function hit_start(StartHittingService $service)
    {
        return $service->response();
    }

    /**
     * 首页信息
     * @RequestMapping(path="main_info", methods="post")
     */
    public function main_info(MainInfoService $service)
    {
        return $service->response();
    }
}
